<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录日志</title>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <style>
        .box{
            width: 1650px;
            height: 1100px;
        }
        .list{
            width: 1650px;
            height: 50px;
            margin-left: 20px;
            background-color:rgb(243,243,243);
        }
        .list-left{
            width: 150px;
            height: 30px;
            margin-top: 10px;
            float: left;
        }
        .list-left-left{
            width: 10px;
            height: 30px;
            float: left;
            background: green;
        }
        .list-left-right{
            width: 100px;
            height: 30px;
            font-size: 14px;
            line-height: 30px;
            float: left;
            text-indent: 5px;
        }
        .list-right{
            float: right;
            margin-top: 5px;
            margin-right: 35px;
        }
        .box-table{
            width: 1650px;
            height: 800px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="list">
            <div class="list-left">
                <div class="list-left-left"></div>
                <p class="list-left-right">管理员首页</p>
            </div>
            <div class="list-right">
                <div class="list-right-left layui-btn layui-icon layui-icon-refresh" onclick="refresh()">&nbsp;刷新</div>
            </div>
        </div>
        <div class="box-table">
            <table id="tableTest" lay-filter="tableTest"></table>
        </div>
    </div>
</body>
<script>
    layui.use(["layer","table","jquery"],function () {
        var layer = layui.layer,
            table = layui.table,
            $ = layui.jquery;
        $.ajax({
            url:"/JsLoginRecord/getAllJsLoginRecord",
            data:{},
            type:'post',
            dataType:'json',
            success:function (data) {
                jsLoginRecord(data.data)
            }
        });

        function jsLoginRecord(data) {
            table.render({
                elem:"#tableTest",
                data:data,
                width:1650,
                page: {
                    layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
                    ,first: "首页" //不显示首页
                    ,last: "尾页" //不显示尾页
                },
                cols: [[
                    {field:'loginIp',title: '登录ip', sort: true,align:"center"}
                    ,{field:'loginAddress', title: '登陆地区',align:"center"}
                    ,{field:'loginDate', title: '登录时间',align:"center"}
                ]]
            })
        }
    })
</script>
</html>